<template>
  <button @click="showDemo = !showDemo">挂载/卸载组件</button>
  <Demo v-if="showDemo"/>
</template>

<script>
import {ref} from 'vue'
import Demo from './components/Demo.vue'
export default {
  name: "App",
  components:{
    Demo
  },
  setup(props) {
    let showDemo = ref(true)

    return{
      showDemo
    }
  }
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
